
/*
Note: See Appendix C.2 for coding scheme and Table C.2 in manuscript for coding by participant

VARIABLES
gnl_final: respondent's coded GNL Support
educ: group composition low or high education
age_cat: respondent age in categories
isex: respondent gender
year: year of data collection

*/

*Load figure5_data.dta

set scheme burd

global barchart "asyvars stack blab(bar, pos(center)) ytitle("") ylabel(,glstyle(minor_grid)) plotregion(margin(tiny)) plotregion(margin(tiny))  bar(1, col(gs14) lc(black)) bar(2, col(black) fi(60) lc(black)) bar(3, col(gs8) lc(black))  bar(4, color(white) lc(black)) nodraw" 
global topt ",size(medsmall) ring(0) pos(12) yoffset(4.5)"

graph bar (count), over(gnl_f) over(educ) $barchart outergap(50) title({bf:(A) Education} $topt) name(educ, replace) 
graph bar (count), over(gnl_f) over(age_c) $barchart outergap(90) yscale(off) title({bf:(C) Age} $topt) name(age, replace) 
graph bar (count), over(gnl_f) over(isex) $barchart outergap(90) yscale(off) title({bf:(C) Gender} $topt) name(sexi, replace) 
graph bar (count), over(gnl_f) over(year) $barchart outergap(90) yscale(off) title({bf:(D) Year} $topt) name(year, replace) 

grc1leg2 educ age sexi year, r(1) ycommon xcommon position(6) lrows(1) legscale(5) xsize(6) iscale(*1.6) ysize(2) 
